package com.game.util;

import processing.core.PApplet;
import processing.core.PConstants;

public class Color {

	private float red = 0;
	private float green = 0;
	private float blue = 0;

	public final static Color RED = new Color(255, 0, 0);
	public final static Color WHITE = new Color(255, 255, 255);
	public final static Color BLUE = new Color(0, 0, 255);
	
	public Color() {
		super();
	}
	
	public Color(float red, float green, float blue) {
		super();
		this.red = red;
		this.green = green;
		this.blue = blue;
	}
	public float getRed() {
		return red;
	}
	public void setRed(float red) {
		this.red = red;
	}
	public float getGreen() {
		return green;
	}
	public void setGreen(float green) {
		this.green = green;
	}
	public float getBlue() {
		return blue;
	}
	public void setBlue(float blue) {
		this.blue = blue;
	}
	public boolean isBlack(){
		return ((red == 0f) && (green == 0f) && (blue == 0f));
	}
	
	public boolean equals(Color color){
		return ((red == color.red) && (green == color.green) && (blue == color.blue));
	}
	
	public float distance(Color color){
		return PApplet.dist(red, green, blue, color.red, color.green, color.blue);
	}
	
}
